cmake_minimum_required(VERSION 3.10)
project(YOLOs_CPP_EdgePlatform)

set(CMAKE_CXX_STANDARD 14)
set(CMAKE_CXX_STANDARD_REQUIRED ON)

# Find OpenCV
find_package(OpenCV REQUIRED)

# Include directories
include_directories(
    ${CMAKE_SOURCE_DIR}/include
    ${OpenCV_INCLUDE_DIRS}
    /usr/include  # For BPU libDNN headers
)

# Example: YOLO11 detection
add_executable(yolo11_demo examples/yolo11_detection_example.cpp)

target_link_libraries(yolo11_demo
    ${OpenCV_LIBS}
    dnn        # BPU libDNN library
    hbmem      # BPU memory library
)

# Installation (optional)
install(DIRECTORY include/ DESTINATION include/yolos-cpp-edgeplatform)

# Print build information
message(STATUS "=== YOLOs-CPP-EdgePlatform Build Configuration ===")
message(STATUS "OpenCV Version: ${OpenCV_VERSION}")
message(STATUS "OpenCV Libs: ${OpenCV_LIBS}")
message(STATUS "C++ Standard: ${CMAKE_CXX_STANDARD}")
